package com.md.youyouhui.net.repo;

import android.arch.lifecycle.LiveData;

import com.md.youyouhui.common.Resource;
import com.md.youyouhui.net.ApiServiceFac;
import com.md.youyouhui.net.response.UserInfoResponse;
import com.md.youyouhui.utils.calladapter.ResourceConvertUtils;

/**
 * Created by AdministratorZJ
 * on 2018/5/25.
 */

public class UserInfoRepo {
    private static UserInfoRepo INSTANCE;

    public static UserInfoRepo newInstance() {
        if (null == INSTANCE) {
            INSTANCE = new UserInfoRepo();
        }
        return INSTANCE;
    }


    public LiveData<Resource<UserInfoResponse>> getUserInfo() {

        return ResourceConvertUtils.convertResource(ApiServiceFac.get().getUserInfo());
    }


}
